package com.darkplanet.management.service;

import com.darkplanet.management.dao.IRequirement;
import com.darkplanet.management.dao.IRequirementimpl;
import com.darkplanet.management.domain.PRMFAll;
import com.darkplanet.management.domain.Requirement;

import java.util.List;

public class RequirementService {
    IRequirement rmt = new IRequirementimpl();

    public Requirement getRequirementById(Integer requirement_id){
        Requirement requirementById = rmt.getRequirementById(requirement_id);
        return requirementById;
    }

    public List getAllRequirement(){
        List getAllRequirement = rmt.getAllRequirement();
        return getAllRequirement;
    }

    public void update(Integer project_id, Integer requirement_id, String title, String simple_desc, String complex_desc, String remark){
        rmt.update(project_id,requirement_id,title,simple_desc,complex_desc,remark);
    }

    public void delete(Integer requirement_id){
        rmt.delete(requirement_id);
    }

    public void add(Integer project_id, String title, String simple_desc, String complex_desc, String remark){
        rmt.add(project_id,title,simple_desc,complex_desc,remark);
    }

    public Requirement getRequirementId(String tittle){
       return rmt.getRequirement_Id(tittle);
    }

    public List getThisMather(){
        List<PRMFAll> mather = rmt.getThisMather();
        return mather;
    }

}
